<form name="fundEditForm" class="form-horizontal" novalidate>
    <div style="height:500px;width:900px;overflow-y:auto;overflow-x:hidden;">
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">合同属性</span>

            <div class="col-sm-8">
                <div class="radio fl">
                    <input type="radio" ng-model="data.fundInfo.contract_property" required value="0" id="rbt_add"
                           name="contract_property" checked="checked">
                    <label for="rbt_add">新增</label>
                </div>
                <div class="radio fl" style="margin:0 0 0 10px;">
                    <input type="radio" ng-model="data.fundInfo.contract_property" required value="1" id="rbt_renew"
                           name="contract_property">
                    <label for="rbt_renew">续签</label>
                </div>
                    <span role="alert" style="clear:both;"
                          ng-show="(fundEditForm.$submitted || fundEditForm.contract_property.$touched) && fundEditForm.contract_property.$error.required"
                          class="clearfix error ng-hide c-red lh30">请选择合同属性</span>
            </div>
        </div>

        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">应收款名称</span>

            <div class="col-sm-8">
                <input select2 ng-model="data.fundInfo.receivable_item_id" select2-model="ddl2FundName"
                       config="ddlConfigFundName" class="form-control idReceivableId" type="text"
                       required name="receivable_item_id" placeholder="应收款名称"/>
                <span role="alert"
                      ng-show="(fundEditForm.$submitted || fundEditForm.receivable_item_id.$touched) && fundEditForm.receivable_item_id.$error.required"
                      class="error ng-hide c-red lh30">应收款名称不能为空</span>
            </div>

            <div ng-if="busnisseType != 4">
                <span class="col-sm-4 control-label">款项小类</span>

                <div class="col-sm-8">
                    <input select2 ng-model="data.fundInfo.money_category_item_id" select2-model="ddl2SmallClass"
                           config="ddlConfigFundSmallClass" class="form-control" type="text"
                           required name="money_category_item_id" placeholder="款项小类"/>
                    <span role="alert"
                          ng-show="(fundEditForm.$submitted || fundEditForm.money_category_item_id.$touched) && fundEditForm.money_category_item_id.$error.required"
                          class="error ng-hide c-red lh30">款项小类不能为空</span>
                </div>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">业务收入项</span>

            <div class="col-sm-8">
                <input select2 ng-model="data.fundInfo.revenue_type" select2-model="ddl2RelIncome"
                       config="ddlConfigIncomeCategory" class="form-control" type="text"
                       required name="revenue_type" id="revenue_type" placeholder="收入项"/>
                <span role="alert"
                      ng-show="(fundEditForm.$submitted || fundEditForm.revenue_type.$touched) && fundEditForm.revenue_type.$error.required"
                      class="error ng-hide c-red lh30">收入项不能为空</span>
            </div>

            <span class="col-sm-4 control-label">应收金额</span>

            <div class="col-sm-8">
                <input type="number" required ng-model="data.fundInfo.receivable_amount" class="form-control"
                       placeholder="应收金额"
                       name="receivable_amount"
                        >
                <span role="alert"
                      ng-show="(fundEditForm.$submitted || fundEditForm.receivable_amount.$touched) && fundEditForm.receivable_amount.$error.required"
                      class="error ng-hide c-red lh30">应收金额不能为空</span>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">应收日期</span>

            <div class="col-sm-8">
                <input type="text" class="input-date fl form-control" style="width:100%"
                       ui-date format="yyyy-MM-dd" ng-model="data.fundInfo.receivable_date"
                       required name="receivable_date" placeholder="应收日期"/>
                <span role="alert"
                      ng-show="(fundEditForm.$submitted || fundEditForm.receivable_date.$touched) && fundEditForm.receivable_date.$error.required"
                      class="error ng-hide c-red lh30">应收日期不能为空</span>
            </div>

            <span class="col-sm-4 control-label">收款责任人</span>

            <div class="col-sm-8">
                <input select2 ng-model="data.fundInfo.payee_id" select2-model="ddl2DutyOfficer"
                       config="ddlConfigDutyOfficer" class="form-control idDutyOfficer" type="text"
                       required name="payee_id" placeholder="收款责任人"/>
                <span role="alert"
                      ng-show="(fundEditForm.$submitted || fundEditForm.payee_id.$touched) && fundEditForm.payee_id.$error.required"
                      class="error ng-hide c-red lh30">收款责任人不能为空</span>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">收款责任部门</span>

            <div class="col-sm-8">
                <input type="text" ng-model="data.fundInfo.department_name" class="form-control" id="inputPrice"
                       ng-disabled="true"
                       placeholder="收款责任部门">
            </div>

            <span class="col-sm-4 control-label">收款责任专业线</span>

            <div class="col-sm-8">
                <input type="text" ng-model="data.fundInfo.professional_line_id" class="form-control" id="inputPrice"
                       ng-disabled="true"
                       placeholder="收款责任专业线">
            </div>
        </div>

	    <div class="form-group mt10 clearfix">
		    <span class="col-sm-4 control-label">产品类型</span>

		    <div class="col-sm-8">
			    <input type="text" ng-model="contractBaseInfo.business_product" class="form-control" id="inputPrice"
			           ng-disabled="true"
			           placeholder="产品类型">
		    </div>
	    </div>

        <div class="form-group mt10 clearfix" ng-if="busnisseType != 4">
            <span class="col-sm-4 control-label">付款条件</span>

            <div class="col-sm-20">
                <textarea type="text" ng-model="data.fundInfo.payment_condition" class="form-control" id="inputPrice"
                          placeholder="付款条件" rows="4"></textarea>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-4 control-label">备注</span>

            <div class="col-sm-20">
                <textarea type="text" ng-model="data.fundInfo.remark" class="form-control" id="inputPrice"
                          placeholder="备注" rows="4"></textarea>
            </div>
        </div>

        <div class="mt20 clearfix ng-scope ml10">
            <span class="fl lh30 f14">应收信息</span>
        </div>
        <div id="grid" class="table-wrap mt10 ml10" style="min-height: 200px;">

            <table width="100%">
                <thead>
                <tr>
                    <th width="40">序号</th>
                    <th width="110">款项名称</th>
                    <th width="170">收入项</th>
                    <th width="175">应收信息</th>
                    <th width="120">收款责任人</th>
                    <th width="108">备注</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="record in editFunds">
                    <td height="40"><p ng-bind="$index + 1"></p></td>
                    <td class="lh14">
                        <p ng-bind="record.receivable_item_name"></p>

                        <p class="c-gray">款项小类:{{record.money_category_item_name}}</p>
                    </td>
                    <td>
                        <p ng-bind="record.revenue_type_name"></p>
                    </td>
                    <td>
                        <p>应收金额:{{record.receivable_amount|number}}</p>

                        <p>应收时间:{{record.receivable_date|strdate:'yyyy-MM-dd'}}</p>
                    </td>
                    <td>
                        <p ng-bind="record.payee_name"></p>
                    </td>
                    <td>
                        <p ng-bind="record.remark"></p>
                    </td>

                </tr>
                </tbody>
            </table>
            <div class="no-data" ng-if="funds.length == 0" style="height:180px"><span>暂无数据</span></div>

        </div>
    </div>
</form>

